<template>
  <div>
    <a-modal v-model="visible" :title="msgInfo.msgTitle" :footer="null" width="800px" :maskClosable="maskClosable" :closable="closable">
      <div v-html="msgInfo.msgContent"></div>
    </a-modal>
  </div>
</template>
<script>
  export default {
    name: 'SysMsgModal',
    data() {
      return {
        visible: false,
        maskClosable: true,
        closable: true,
        msgInfo: {}
      }
    },
    methods: {
      getSysMessageInfo(msgId) {
        this.http.get(this, {
          url: this.api.content.get,
          data: { msgId: msgId },
          success: function(me, data) {
            console.log(data)
            me.msgInfo = data
            me.visible = true
          }
        })
      },
      showModal(msgId) {
        this.getSysMessageInfo(msgId)
      },
      stopUseSystem() {
        this.maskClosable = false
        this.closable = false
      }
    }
  }
</script>
<style lang="less">
  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
</style>